SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
/* 
	RETORNA TODAS LA BECAS LIQUIDADAS PARA UN DETERMINADO PERIODO 
*/
CREATE PROCEDURE [dbo].[spMovimientosLiquidacionBYP]
@id int,
@idPeriodo int

AS

Select idMovimiento as id, Documento as DocAlumno, Monto as MontoTotal, Fecha, tb_BecasYPrestamos.MontoTotal
from tb_BecasYPrestamos, tb_MovimientosLiquidacionBYP,  tb_TiposDeBYP, tb_Alumnos
where idBeca = tb_MovimientosLiquidacionBYP.BecaOPrestamo and
tb_TiposDeBYP.idTipoBYP = @id and
Periodo = @idPeriodo and
tb_MovimientosLiquidacionBYP.BecaOPrestamo = idBeca and
tb_TiposDeBYP.idTipoBYP = tb_BecasYPrestamos.Tipo and
tb_Alumnos.idAlumno = tb_BecasYPrestamos.alumno














GO
